"""
全局变量管理模块
"""


def _init(dct=None):  # 初始化
	global _global_dict
	_global_dict = dct if dct is not None else {}
	# if dct is not None:
	# 	_global_dict = dct
	# else:
	# 	_global_dict = {}


def set_value(key, value):
	_global_dict[key] = value


def get_value(key, defValue=None):
	try:
		return _global_dict[key]
	except KeyError:
		return defValue


def get_global():
	return _global_dict
